import request from './request'

export function getOrderList(params: any) {
  return request({
    url: '/order',
    method: 'get',
    params
  })
}

export function getOrderDetail(id: number) {
  return request({
    url: `/order/${id}`,
    method: 'get'
  })
}

export function deleteOrder(id: number) {
  return request({
    url: `/order/${id}`,
    method: 'delete'
  })
}

export function updateOrderStatus(id: number, status: string) {
  return request({
    url: `/order/${id}/status`,
    method: 'put',
    data: { status }
  })
}
